<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>hashcat-3.201: H:/TDDownload/Hashcat v3.20/hashcat-3.201/src/induct.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">hashcat-3.201
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_06fe396e3e859736df6d43ad26baa72e.html">hashcat-3.201</a></li><li class="navelem"><a class="el" href="dir_9ce3dfc5d638c7f8b2c4ec0f6627771b.html">src</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">induct.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;common.h&quot;</code><br />
<code>#include &quot;types.h&quot;</code><br />
<code>#include &quot;memory.h&quot;</code><br />
<code>#include &quot;event.h&quot;</code><br />
<code>#include &quot;folder.h&quot;</code><br />
<code>#include &quot;shared.h&quot;</code><br />
<code>#include &quot;induct.h&quot;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for induct.c:</div>
<div class="dyncontent">
<div class="center"><img src="induct_8c__incl.gif" border="0" usemap="#_h_1_2_t_d_download_2_hashcat_01v3_820_2hashcat-3_8201_2src_2induct_8c" alt=""/></div>
<map name="_h_1_2_t_d_download_2_hashcat_01v3_820_2hashcat-3_8201_2src_2induct_8c" id="_h_1_2_t_d_download_2_hashcat_01v3_820_2hashcat-3_8201_2src_2induct_8c">
<area shape="rect"  title=" " alt="" coords="257,5,420,61"/>
<area shape="rect"  title=" " alt="" coords="5,109,88,136"/>
<area shape="rect"  title=" " alt="" coords="113,109,178,136"/>
<area shape="rect"  title=" " alt="" coords="203,109,283,136"/>
<area shape="rect"  title=" " alt="" coords="307,109,370,136"/>
<area shape="rect"  title=" " alt="" coords="395,109,459,136"/>
<area shape="rect"  title=" " alt="" coords="483,109,555,136"/>
<area shape="rect"  title=" " alt="" coords="579,109,647,136"/>
</map>
</div>
</div>
<p><a href="induct_8c_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ae7fa550c9537f1b4036f849feb3761af"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="induct_8c.html#ae7fa550c9537f1b4036f849feb3761af">sort_by_mtime</a> (const void *p1, const void *p2)</td></tr>
<tr class="separator:ae7fa550c9537f1b4036f849feb3761af"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae311757af7f13bf163ecd0ec8d32098c"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="induct_8c.html#ae311757af7f13bf163ecd0ec8d32098c">induct_ctx_init</a> (hashcat_ctx_t *hashcat_ctx)</td></tr>
<tr class="separator:ae311757af7f13bf163ecd0ec8d32098c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3f87d03536d320ed0caf58058947cfe0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="induct_8c.html#a3f87d03536d320ed0caf58058947cfe0">induct_ctx_scan</a> (hashcat_ctx_t *hashcat_ctx)</td></tr>
<tr class="separator:a3f87d03536d320ed0caf58058947cfe0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a12b7e62ced571bf76b05d4093804dba6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="induct_8c.html#a12b7e62ced571bf76b05d4093804dba6">induct_ctx_destroy</a> (hashcat_ctx_t *hashcat_ctx)</td></tr>
<tr class="separator:a12b7e62ced571bf76b05d4093804dba6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="a12b7e62ced571bf76b05d4093804dba6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a12b7e62ced571bf76b05d4093804dba6">&#9670;&nbsp;</a></span>induct_ctx_destroy()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void induct_ctx_destroy </td>
          <td>(</td>
          <td class="paramtype">hashcat_ctx_t *&#160;</td>
          <td class="paramname"><em>hashcat_ctx</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="induct_8c_source.html#l00111">111</a> of file <a class="el" href="induct_8c_source.html">induct.c</a>.</p>
<div class="fragment"><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;{</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;  induct_ctx_t *induct_ctx = hashcat_ctx-&gt;induct_ctx;</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;  <span class="keywordflow">if</span> (induct_ctx-&gt;enabled == <span class="keyword">false</span>) <span class="keywordflow">return</span>;</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;  <span class="keywordflow">if</span> (rmdir (induct_ctx-&gt;root_directory) == -1)</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;  {</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;    <span class="keywordflow">if</span> (errno == ENOENT)</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;    {</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;      <span class="comment">// good, we can ignore</span></div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;    }</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;    <span class="keywordflow">else</span> <span class="keywordflow">if</span> (errno == ENOTEMPTY)</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;    {</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;      <span class="comment">// good, we can ignore</span></div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;    }</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;    <span class="keywordflow">else</span></div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;    {</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;      <a class="code" href="event_8c.html#ab419d8d7e9b12e78980ed9f17bdd5ed5">event_log_error</a> (hashcat_ctx, <span class="stringliteral">&quot;%s: %s&quot;</span>, induct_ctx-&gt;root_directory, strerror (errno));</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;      <span class="comment">//return -1;</span></div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;    }</div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;  }</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;  <a class="code" href="memory_8c.html#ad8ba3dcf1734b1d2c8679600f0f0c3c9">hcfree</a> (induct_ctx-&gt;root_directory);</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;  memset (induct_ctx, 0, <span class="keyword">sizeof</span> (induct_ctx_t));</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;}</div><div class="ttc" id="memory_8c_html_ad8ba3dcf1734b1d2c8679600f0f0c3c9"><div class="ttname"><a href="memory_8c.html#ad8ba3dcf1734b1d2c8679600f0f0c3c9">hcfree</a></div><div class="ttdeci">void hcfree(void *ptr)</div><div class="ttdef"><b>Definition:</b> <a href="memory_8c_source.html#l00071">memory.c:71</a></div></div>
<div class="ttc" id="event_8c_html_ab419d8d7e9b12e78980ed9f17bdd5ed5"><div class="ttname"><a href="event_8c.html#ab419d8d7e9b12e78980ed9f17bdd5ed5">event_log_error</a></div><div class="ttdeci">size_t event_log_error(hashcat_ctx_t *hashcat_ctx, const char *fmt,...)</div><div class="ttdef"><b>Definition:</b> <a href="event_8c_source.html#l00168">event.c:168</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="event_8c_source.html#l00168">event_log_error()</a>, and <a class="el" href="memory_8c_source.html#l00071">hcfree()</a>.</p>

<p class="reference">Referenced by <a class="el" href="hashcat_8c_source.html#l01134">hashcat_session_destroy()</a>.</p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="induct_8c_a12b7e62ced571bf76b05d4093804dba6_cgraph.gif" border="0" usemap="#induct_8c_a12b7e62ced571bf76b05d4093804dba6_cgraph" alt=""/></div>
<map name="induct_8c_a12b7e62ced571bf76b05d4093804dba6_cgraph" id="induct_8c_a12b7e62ced571bf76b05d4093804dba6_cgraph">
<area shape="rect"  title=" " alt="" coords="5,56,137,83"/>
<area shape="rect"  href="event_8c.html#ab419d8d7e9b12e78980ed9f17bdd5ed5" title=" " alt="" coords="185,31,295,57"/>
<area shape="rect"  href="memory_8c.html#ad8ba3dcf1734b1d2c8679600f0f0c3c9" title=" " alt="" coords="211,81,269,108"/>
<area shape="rect"  href="event_8c.html#a6221c6caa1d2069ad1c3103f0b013ef7" title=" " alt="" coords="343,5,421,32"/>
<area shape="rect"  href="event_8c.html#ad5a30ac9dc4301540e19643500eb78e4" title=" " alt="" coords="344,56,420,83"/>
</map>
</div>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="induct_8c_a12b7e62ced571bf76b05d4093804dba6_icgraph.gif" border="0" usemap="#induct_8c_a12b7e62ced571bf76b05d4093804dba6_icgraph" alt=""/></div>
<map name="induct_8c_a12b7e62ced571bf76b05d4093804dba6_icgraph" id="induct_8c_a12b7e62ced571bf76b05d4093804dba6_icgraph">
<area shape="rect"  title=" " alt="" coords="323,5,455,32"/>
<area shape="rect"  href="hashcat_8c.html#aac7de5dfb85c0aa9bccebf9782855ffa" title=" " alt="" coords="104,5,275,32"/>
<area shape="rect"  href="main_8c.html#a3c04138a5bfe5d72780bb7e82a18e627" title=" " alt="" coords="5,5,56,32"/>
</map>
</div>

</div>
</div>
<a id="ae311757af7f13bf163ecd0ec8d32098c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae311757af7f13bf163ecd0ec8d32098c">&#9670;&nbsp;</a></span>induct_ctx_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int induct_ctx_init </td>
          <td>(</td>
          <td class="paramtype">hashcat_ctx_t *&#160;</td>
          <td class="paramname"><em>hashcat_ctx</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="induct_8c_source.html#l00025">25</a> of file <a class="el" href="induct_8c_source.html">induct.c</a>.</p>
<div class="fragment"><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;{</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;  folder_config_t *folder_config = hashcat_ctx-&gt;folder_config;</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;  induct_ctx_t    *induct_ctx    = hashcat_ctx-&gt;induct_ctx;</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;  user_options_t  *user_options  = hashcat_ctx-&gt;user_options;</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;  induct_ctx-&gt;enabled = <span class="keyword">false</span>;</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;  <span class="keywordflow">if</span> (user_options-&gt;benchmark   == <span class="keyword">true</span>) <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;  <span class="keywordflow">if</span> (user_options-&gt;keyspace    == <span class="keyword">true</span>) <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;  <span class="keywordflow">if</span> (user_options-&gt;left        == <span class="keyword">true</span>) <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;  <span class="keywordflow">if</span> (user_options-&gt;opencl_info == <span class="keyword">true</span>) <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;  <span class="keywordflow">if</span> (user_options-&gt;show        == <span class="keyword">true</span>) <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;  <span class="keywordflow">if</span> (user_options-&gt;stdout_flag == <span class="keyword">true</span>) <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;  <span class="keywordflow">if</span> (user_options-&gt;speed_only  == <span class="keyword">true</span>) <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;  <span class="keywordflow">if</span> (user_options-&gt;usage       == <span class="keyword">true</span>) <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;  <span class="keywordflow">if</span> (user_options-&gt;version     == <span class="keyword">true</span>) <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;  <span class="keywordflow">if</span> (user_options-&gt;attack_mode == ATTACK_MODE_BF)    <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;  <span class="keywordflow">if</span> (user_options-&gt;attack_mode == ATTACK_MODE_COMBI) <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;  induct_ctx-&gt;enabled = <span class="keyword">true</span>;</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;  <span class="keywordflow">if</span> (user_options-&gt;induction_dir == NULL)</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;  {</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;    <span class="keywordtype">char</span> *root_directory = (<span class="keywordtype">char</span> *) <a class="code" href="memory_8c.html#aac788cecd4f6c2a1524456f4a5db7cdc">hcmalloc</a> (HCBUFSIZ_TINY);</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;    snprintf (root_directory, HCBUFSIZ_TINY - 1, <span class="stringliteral">&quot;%s/%s.%s&quot;</span>, folder_config-&gt;session_dir, user_options-&gt;session, INDUCT_DIR);</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    <span class="keywordflow">if</span> (rmdir (root_directory) == -1)</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    {</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;      <span class="keywordflow">if</span> (errno == ENOENT)</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;      {</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;        <span class="comment">// good, we can ignore</span></div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;      }</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;      <span class="keywordflow">else</span> <span class="keywordflow">if</span> (errno == ENOTEMPTY)</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;      {</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;        <span class="keywordtype">char</span> *root_directory_mv = (<span class="keywordtype">char</span> *) <a class="code" href="memory_8c.html#aac788cecd4f6c2a1524456f4a5db7cdc">hcmalloc</a> (HCBUFSIZ_TINY);</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;        snprintf (root_directory_mv, HCBUFSIZ_TINY - 1, <span class="stringliteral">&quot;%s/%s.induct.%d&quot;</span>, folder_config-&gt;session_dir, user_options-&gt;session, (<span class="keywordtype">int</span>) time (NULL));</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;        <span class="keywordflow">if</span> (rename (root_directory, root_directory_mv) != 0)</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;        {</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;          <a class="code" href="event_8c.html#ab419d8d7e9b12e78980ed9f17bdd5ed5">event_log_error</a> (hashcat_ctx, <span class="stringliteral">&quot;Rename directory %s to %s: %s&quot;</span>, root_directory, root_directory_mv, strerror (errno));</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;          <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;        }</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;      }</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;      <span class="keywordflow">else</span></div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;      {</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;        <a class="code" href="event_8c.html#ab419d8d7e9b12e78980ed9f17bdd5ed5">event_log_error</a> (hashcat_ctx, <span class="stringliteral">&quot;%s: %s&quot;</span>, root_directory, strerror (errno));</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;        <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;      }</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;    }</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="folder_8c.html#a46700af30821003d1bd4636eb89394b6">hc_mkdir</a> (root_directory, 0700) == -1)</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;    {</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;      <a class="code" href="event_8c.html#ab419d8d7e9b12e78980ed9f17bdd5ed5">event_log_error</a> (hashcat_ctx, <span class="stringliteral">&quot;%s: %s&quot;</span>, root_directory, strerror (errno));</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;      <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;    }</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;    induct_ctx-&gt;root_directory = root_directory;</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;  }</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;  <span class="keywordflow">else</span></div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;  {</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;    induct_ctx-&gt;root_directory = <a class="code" href="memory_8c.html#a03315d6f4ee82f54f7f4461a884dc32a">hcstrdup</a> (user_options-&gt;induction_dir);</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;  }</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;  <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;}</div><div class="ttc" id="folder_8c_html_a46700af30821003d1bd4636eb89394b6"><div class="ttname"><a href="folder_8c.html#a46700af30821003d1bd4636eb89394b6">hc_mkdir</a></div><div class="ttdeci">int hc_mkdir(const char *name, MAYBE_UNUSED const int mode)</div><div class="ttdef"><b>Definition:</b> <a href="folder_8c_source.html#l00486">folder.c:486</a></div></div>
<div class="ttc" id="event_8c_html_ab419d8d7e9b12e78980ed9f17bdd5ed5"><div class="ttname"><a href="event_8c.html#ab419d8d7e9b12e78980ed9f17bdd5ed5">event_log_error</a></div><div class="ttdeci">size_t event_log_error(hashcat_ctx_t *hashcat_ctx, const char *fmt,...)</div><div class="ttdef"><b>Definition:</b> <a href="event_8c_source.html#l00168">event.c:168</a></div></div>
<div class="ttc" id="memory_8c_html_a03315d6f4ee82f54f7f4461a884dc32a"><div class="ttname"><a href="memory_8c.html#a03315d6f4ee82f54f7f4461a884dc32a">hcstrdup</a></div><div class="ttdeci">char * hcstrdup(const char *s)</div><div class="ttdef"><b>Definition:</b> <a href="memory_8c_source.html#l00056">memory.c:56</a></div></div>
<div class="ttc" id="memory_8c_html_aac788cecd4f6c2a1524456f4a5db7cdc"><div class="ttname"><a href="memory_8c.html#aac788cecd4f6c2a1524456f4a5db7cdc">hcmalloc</a></div><div class="ttdeci">void * hcmalloc(const size_t sz)</div><div class="ttdef"><b>Definition:</b> <a href="memory_8c_source.html#l00024">memory.c:24</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="event_8c_source.html#l00168">event_log_error()</a>, <a class="el" href="folder_8c_source.html#l00486">hc_mkdir()</a>, <a class="el" href="memory_8c_source.html#l00024">hcmalloc()</a>, and <a class="el" href="memory_8c_source.html#l00056">hcstrdup()</a>.</p>

<p class="reference">Referenced by <a class="el" href="hashcat_8c_source.html#l00833">hashcat_session_init()</a>.</p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="induct_8c_ae311757af7f13bf163ecd0ec8d32098c_cgraph.gif" border="0" usemap="#induct_8c_ae311757af7f13bf163ecd0ec8d32098c_cgraph" alt=""/></div>
<map name="induct_8c_ae311757af7f13bf163ecd0ec8d32098c_cgraph" id="induct_8c_ae311757af7f13bf163ecd0ec8d32098c_cgraph">
<area shape="rect"  title=" " alt="" coords="5,93,112,120"/>
<area shape="rect"  href="event_8c.html#ab419d8d7e9b12e78980ed9f17bdd5ed5" title=" " alt="" coords="160,17,269,44"/>
<area shape="rect"  href="folder_8c.html#a46700af30821003d1bd4636eb89394b6" title=" " alt="" coords="177,68,252,95"/>
<area shape="rect"  href="memory_8c.html#aac788cecd4f6c2a1524456f4a5db7cdc" title=" " alt="" coords="319,132,394,159"/>
<area shape="rect"  href="memory_8c.html#a03315d6f4ee82f54f7f4461a884dc32a" title=" " alt="" coords="179,169,251,196"/>
<area shape="rect"  href="event_8c.html#a6221c6caa1d2069ad1c3103f0b013ef7" title=" " alt="" coords="317,5,396,32"/>
<area shape="rect"  href="event_8c.html#ad5a30ac9dc4301540e19643500eb78e4" title=" " alt="" coords="319,56,395,83"/>
</map>
</div>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="induct_8c_ae311757af7f13bf163ecd0ec8d32098c_icgraph.gif" border="0" usemap="#induct_8c_ae311757af7f13bf163ecd0ec8d32098c_icgraph" alt=""/></div>
<map name="induct_8c_ae311757af7f13bf163ecd0ec8d32098c_icgraph" id="induct_8c_ae311757af7f13bf163ecd0ec8d32098c_icgraph">
<area shape="rect"  title=" " alt="" coords="296,5,403,32"/>
<area shape="rect"  href="hashcat_8c.html#a9f3f1b757bdc2a874b4bb0dc657bde1d" title=" " alt="" coords="104,5,248,32"/>
<area shape="rect"  href="main_8c.html#a3c04138a5bfe5d72780bb7e82a18e627" title=" " alt="" coords="5,5,56,32"/>
</map>
</div>

</div>
</div>
<a id="a3f87d03536d320ed0caf58058947cfe0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3f87d03536d320ed0caf58058947cfe0">&#9670;&nbsp;</a></span>induct_ctx_scan()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void induct_ctx_scan </td>
          <td>(</td>
          <td class="paramtype">hashcat_ctx_t *&#160;</td>
          <td class="paramname"><em>hashcat_ctx</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="induct_8c_source.html#l00098">98</a> of file <a class="el" href="induct_8c_source.html">induct.c</a>.</p>
<div class="fragment"><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;{</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;  induct_ctx_t *induct_ctx = hashcat_ctx-&gt;induct_ctx;</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;  <span class="keywordflow">if</span> (induct_ctx-&gt;enabled == <span class="keyword">false</span>) <span class="keywordflow">return</span>;</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;  induct_ctx-&gt;induction_dictionaries = <a class="code" href="folder_8c.html#ab1b45d4b9134e94d056df48b098bc925">scan_directory</a> (induct_ctx-&gt;root_directory);</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;  induct_ctx-&gt;induction_dictionaries_cnt = <a class="code" href="folder_8c.html#ab26f541fb9b4371e031974f3963d1461">count_dictionaries</a> (induct_ctx-&gt;induction_dictionaries);</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;  qsort (induct_ctx-&gt;induction_dictionaries, (<span class="keywordtype">size_t</span>) induct_ctx-&gt;induction_dictionaries_cnt, sizeof (<span class="keywordtype">char</span> *), <a class="code" href="induct_8c.html#ae7fa550c9537f1b4036f849feb3761af">sort_by_mtime</a>);</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;}</div><div class="ttc" id="folder_8c_html_ab1b45d4b9134e94d056df48b098bc925"><div class="ttname"><a href="folder_8c.html#ab1b45d4b9134e94d056df48b098bc925">scan_directory</a></div><div class="ttdeci">char ** scan_directory(const char *path)</div><div class="ttdef"><b>Definition:</b> <a href="folder_8c_source.html#l00178">folder.c:178</a></div></div>
<div class="ttc" id="induct_8c_html_ae7fa550c9537f1b4036f849feb3761af"><div class="ttname"><a href="induct_8c.html#ae7fa550c9537f1b4036f849feb3761af">sort_by_mtime</a></div><div class="ttdeci">static int sort_by_mtime(const void *p1, const void *p2)</div><div class="ttdef"><b>Definition:</b> <a href="induct_8c_source.html#l00014">induct.c:14</a></div></div>
<div class="ttc" id="folder_8c_html_ab26f541fb9b4371e031974f3963d1461"><div class="ttname"><a href="folder_8c.html#ab26f541fb9b4371e031974f3963d1461">count_dictionaries</a></div><div class="ttdeci">int count_dictionaries(char **dictionary_files)</div><div class="ttdef"><b>Definition:</b> <a href="folder_8c_source.html#l00114">folder.c:114</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="folder_8c_source.html#l00114">count_dictionaries()</a>, <a class="el" href="folder_8c_source.html#l00178">scan_directory()</a>, and <a class="el" href="induct_8c_source.html#l00014">sort_by_mtime()</a>.</p>

<p class="reference">Referenced by <a class="el" href="hashcat_8c_source.html#l00055">inner2_loop()</a>.</p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="induct_8c_a3f87d03536d320ed0caf58058947cfe0_cgraph.gif" border="0" usemap="#induct_8c_a3f87d03536d320ed0caf58058947cfe0_cgraph" alt=""/></div>
<map name="induct_8c_a3f87d03536d320ed0caf58058947cfe0_cgraph" id="induct_8c_a3f87d03536d320ed0caf58058947cfe0_cgraph">
<area shape="rect"  title=" " alt="" coords="5,81,123,108"/>
<area shape="rect"  href="folder_8c.html#ab26f541fb9b4371e031974f3963d1461" title=" " alt="" coords="171,31,297,57"/>
<area shape="rect"  href="folder_8c.html#ab1b45d4b9134e94d056df48b098bc925" title=" " alt="" coords="181,81,287,108"/>
<area shape="rect"  href="induct_8c.html#ae7fa550c9537f1b4036f849feb3761af" title=" " alt="" coords="180,132,288,159"/>
<area shape="rect"  href="memory_8c.html#ad8ba3dcf1734b1d2c8679600f0f0c3c9" title=" " alt="" coords="354,5,411,32"/>
<area shape="rect"  href="memory_8c.html#aac788cecd4f6c2a1524456f4a5db7cdc" title=" " alt="" coords="468,107,543,133"/>
<area shape="rect"  href="memory_8c.html#a42c19c60b8cdb265ddabe5c1686c4fa5" title=" " alt="" coords="345,107,420,133"/>
<area shape="rect"  href="memory_8c.html#a03315d6f4ee82f54f7f4461a884dc32a" title=" " alt="" coords="347,157,419,184"/>
</map>
</div>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="induct_8c_a3f87d03536d320ed0caf58058947cfe0_icgraph.gif" border="0" usemap="#induct_8c_a3f87d03536d320ed0caf58058947cfe0_icgraph" alt=""/></div>
<map name="induct_8c_a3f87d03536d320ed0caf58058947cfe0_icgraph" id="induct_8c_a3f87d03536d320ed0caf58058947cfe0_icgraph">
<area shape="rect"  title=" " alt="" coords="728,5,845,32"/>
<area shape="rect"  href="hashcat_8c.html#a9ec4f74d423ae0bd4aa6e960632b7086" title=" " alt="" coords="592,5,680,32"/>
<area shape="rect"  href="hashcat_8c.html#ad6cc36d03dcdad3413c794efecb3178a" title=" " alt="" coords="456,5,544,32"/>
<area shape="rect"  href="hashcat_8c.html#ac33e9695b713153c0fc7cce11696704b" title=" " alt="" coords="325,5,408,32"/>
<area shape="rect"  href="hashcat_8c.html#ac49fece3f82732fda9eb29766cc01168" title=" " alt="" coords="104,5,277,32"/>
<area shape="rect"  href="main_8c.html#a3c04138a5bfe5d72780bb7e82a18e627" title=" " alt="" coords="5,5,56,32"/>
</map>
</div>

</div>
</div>
<a id="ae7fa550c9537f1b4036f849feb3761af"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae7fa550c9537f1b4036f849feb3761af">&#9670;&nbsp;</a></span>sort_by_mtime()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static int sort_by_mtime </td>
          <td>(</td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>p1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>p2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Author......: See docs/credits.txt License.....: MIT </p>

<p class="definition">Definition at line <a class="el" href="induct_8c_source.html#l00014">14</a> of file <a class="el" href="induct_8c_source.html">induct.c</a>.</p>
<div class="fragment"><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;{</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;  <span class="keyword">const</span> <span class="keywordtype">char</span> **f1 = (<span class="keyword">const</span> <span class="keywordtype">char</span> **) p1;</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;  <span class="keyword">const</span> <span class="keywordtype">char</span> **f2 = (<span class="keyword">const</span> <span class="keywordtype">char</span> **) p2;</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;  hc_stat_t s1; hc_stat (*f1, &amp;s1);</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;  hc_stat_t s2; hc_stat (*f2, &amp;s2);</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;  <span class="keywordflow">return</span> s2.st_mtime - s1.st_mtime;</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;}</div></div><!-- fragment -->
<p class="reference">Referenced by <a class="el" href="induct_8c_source.html#l00098">induct_ctx_scan()</a>.</p>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="induct_8c_ae7fa550c9537f1b4036f849feb3761af_icgraph.gif" border="0" usemap="#induct_8c_ae7fa550c9537f1b4036f849feb3761af_icgraph" alt=""/></div>
<map name="induct_8c_ae7fa550c9537f1b4036f849feb3761af_icgraph" id="induct_8c_ae7fa550c9537f1b4036f849feb3761af_icgraph">
<area shape="rect"  title=" " alt="" coords="893,5,1001,32"/>
<area shape="rect"  href="induct_8c.html#a3f87d03536d320ed0caf58058947cfe0" title=" " alt="" coords="728,5,845,32"/>
<area shape="rect"  href="hashcat_8c.html#a9ec4f74d423ae0bd4aa6e960632b7086" title=" " alt="" coords="592,5,680,32"/>
<area shape="rect"  href="hashcat_8c.html#ad6cc36d03dcdad3413c794efecb3178a" title=" " alt="" coords="456,5,544,32"/>
<area shape="rect"  href="hashcat_8c.html#ac33e9695b713153c0fc7cce11696704b" title=" " alt="" coords="325,5,408,32"/>
<area shape="rect"  href="hashcat_8c.html#ac49fece3f82732fda9eb29766cc01168" title=" " alt="" coords="104,5,277,32"/>
<area shape="rect"  href="main_8c.html#a3c04138a5bfe5d72780bb7e82a18e627" title=" " alt="" coords="5,5,56,32"/>
</map>
</div>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>
